<?php
class ControllerExtensionModulemlist extends Controller {
	public function index($setting) {
		static $module = 0;
		if(isset($setting['list1'])){
			$data['list1']=$setting['list1'];
		}
		else{
			$data['list1']=array();
		}
		if(isset($setting['list2'])){
			$data['list2']=$setting['list2'];
		}
		else{
			$data['list2']=array();
		}
		if(isset($setting['list3'])){
			$data['list3']=$setting['list3'];
		}
		else{
			$data['list3']=array();
		}
		if(isset($setting['list1_title'])){
			$data['list1_title']=$setting['list1_title'];
		}
		if(isset($setting['list1_des'])){
			$data['list1_des']=$setting['list1_des'];
		}
		if(isset($setting['list1_link'])){
			$data['list1_link']=$setting['list1_link'];
		}
		if(isset($setting['list1_bgcolor'])){
			$data['list1_bgcolor']=$setting['list1_bgcolor'];
		}
		if (!empty($setting['list1_bg'])&&is_file(DIR_IMAGE . $setting['list1_bg'])) {
			$data['list1_bg'] = $setting['list1_bg'];
		} else {
			$data['list1_bg'] = 'no_image.png';
		}
		if(isset($setting['list3_title'])){
			$data['list3_title']=$setting['list3_title'];
		}
		if(isset($setting['list3_link'])){
			$data['list3_link']=$setting['list3_link'];
		}
		if(isset($setting['list4_title'])){
			$data['list4_title']=$setting['list4_title'];
		}
		if(isset($setting['list4_des'])){
			$data['list4_des']=$setting['list4_des'];
		}
		//$data['setting']=$setting;
		$data['module'] = $module++;
		return $this->load->view('extension/module/mlist', $data);
	}
}